﻿@Code
    ViewData("Title") = "Create"
End Code

<div id="page">

    <div id="page_header" style="position:relative;">
        Create Record
    </div>

    <div id="page_body">
            
        <div class="IE_padding_hack">
	
            @Using Html.BeginForm("create", "MonthlySummary", FormMethod.Post)
                    
                @<table class="basic">
                    <tr>
                        <th><label for="month"> Month  <b class="red">*</b></label></th>
                        <td><input id="month" class="" type="text" name="month" value="@Now.ToString("yyyy-MM")"/>
                                <span> YYYY-MM format.Required. </span></td>
                    </tr><tr>
                        <th><label for="owner"> Owner <b class="red">*</b></label></th>
                        <td><input id="owner" type="text" name="owner" value=""/></td>
                    </tr><tr>
                        <th><label for="spend"> Spend <b class="red">*</b></label></th>
                        <td><input id="spend" class="" type="text" name="spend"/></td>
                    </tr><tr>
                        <th><label for="income"> Income <b class="red">*</b></label></th>
                        <td><input id="income" class="" type="text" name="income"/></td>
                    </tr><tr>
                        <th><label for="remark"> Remark <b class="red">*</b></label></th>
                        <td><input id="remark" class="" type="text" name="remark"/></td>
                    </tr><tr>
                        <td colspan="2"><input type="submit" id="submit" value="Save"> or @Html.ActionLink("Cancel", "index")</td>
                    </tr>
                </table>
		
            End Using

        </div>
                    
    </div>
        
</div>

@section Scripts

<script type="text/javascript">

    $(function () {
        $("#banner li").removeClass("active").eq(3).addClass("active");

        $("#submit").click(function () {
            var spend = $("#spend").val();
            var income = $("#income").val();
            if (IsNumeric(spend) && IsNumeric(income)) {
                $("#spend").val(Math.round(spend));
                $("#income").val(Math.round(income));
                return true;
            } else {
                alert("amount is not a number!");
                return false;
            };
        });
    });
    
</script>

End Section